package com.fsnbigdata.service.api;
import com.fsnbigdata.domain.EndangeredSpecies;
import com.fsnbigdata.domain.Organism;
import com.fsnbigdata.domain.dto.NamingPair2;
import com.querydsl.core.types.Predicate;
import org.springframework.roo.addon.layers.service.annotations.RooService;
import io.springlets.data.domain.GlobalSearch;
import io.springlets.format.EntityResolver;
import java.util.List;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

/**
 * = EndangeredSpeciesService
 *
 * TODO Auto-generated class documentation
 *
 */
@RooService(entity = EndangeredSpecies.class)
public interface EndangeredSpeciesService extends EntityResolver<EndangeredSpecies, Long> {

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return EndangeredSpecies
     */
    public abstract EndangeredSpecies findOne(Long id);

    /**
     * TODO Auto-generated method documentation
     *
     * @param endangeredSpecies
     */
    public abstract void delete(EndangeredSpecies endangeredSpecies);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entities
     * @return List
     */
    public abstract List<EndangeredSpecies> save(Iterable<EndangeredSpecies> entities);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     */
    public abstract void delete(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @param entity
     * @return EndangeredSpecies
     */
    public abstract EndangeredSpecies save(EndangeredSpecies entity);

    /**
     * TODO Auto-generated method documentation
     *
     * @param id
     * @return EndangeredSpecies
     */
    public abstract EndangeredSpecies findOneForUpdate(Long id);

    /**
     *
     * @param predicate
     * @param pageable
     * @return
     */
    public abstract Page<EndangeredSpecies> search(Predicate predicate, Pageable pageable);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @return List
     */
    public abstract List<EndangeredSpecies> findAll(Iterable<Long> ids);

    /**
     * TODO Auto-generated method documentation
     *
     * @return List
     */
    public abstract List<EndangeredSpecies> findAll();

    /**
     * TODO Auto-generated method documentation
     *
     * @return Long
     */
    public abstract long count();


    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<EndangeredSpecies> findAll(GlobalSearch globalSearch, Pageable pageable);


    /**
     * TODO Auto-generated method documentation
     *
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<EndangeredSpecies> findAll(GlobalSearch globalSearch, Pageable pageable, String creator);

    /**
     * TODO Auto-generated method documentation
     *
     * @param ids
     * @param globalSearch
     * @param pageable
     * @return Page
     */
    public abstract Page<EndangeredSpecies> findAllByIdsIn(List<Long> ids, GlobalSearch globalSearch, Pageable pageable);


    List<NamingPair2> findAllByInitial(String initial);

    List getPageList(String name, String latin, Pageable pageable1);
}
